package org.etlt.extract;

import org.etlt.SettingCheck;

import java.util.List;

public class LinkedExtractorSetting extends ExtractorSetting {

    private String name;
    private List<String> extractors;
    private List<String> criteria;

    private String type;

    private String sort;

    public List<String> getExtractors() {
        return extractors;
    }

    public void setExtractors(List<String> extractors) {
        this.extractors = extractors;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public List<String> getCriteria() {
        return criteria;
    }

    public void setCriteria(List<String> criteria) {
        this.criteria = criteria;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    @Override
    public void check() {
        super.check();
        getColumnSettings().forEach(setting -> {
            if(setting instanceof SettingCheck){
                ((SettingCheck)setting).check();
            }
        });
    }
}
